def get_score():
    scores = []
    with open("012.txt", 'r', encoding='utf-8') as f:
        for line in f:
            # 去掉最后的换行符
            line = line[:-1]
            score = int(line.split(",")[2])
            scores.append(score)
        max_score = max(scores)
        min_score = min(scores)
        ave_score = sum(scores) / len(scores)
        return max_score, min_score, ave_score


a = get_score()
print(a)
